﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             x:Class="nRoute.Samples.FutureDesktop.App"
             xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
             xmlns:n="http://nRoute/schemas/2010/xaml">
    
    <Application.ApplicationLifetimeObjects>
        <n:nRouteApplicationService/>
    </Application.ApplicationLifetimeObjects>
          
    <Application.Resources>
        
    	<SolidColorBrush x:Key="MediumContrastBkgBrush" Color="#FF3EB90F"/>        
    	<SolidColorBrush x:Key="BkgContrastColorBrush" Color="#FF89E830"/>
    	<SolidColorBrush x:Key="BkgDarkColourBrush" Color="#FF463E33"/>
    	<SolidColorBrush x:Key="BkgDarkContrastColourBrush" Color="#FF7C6E65"/>
    	<SolidColorBrush x:Key="ForegroundLight2ColourBrush" Color="#FF81B8DB"/>
    	<SolidColorBrush x:Key="ForegroundLight1ColourBrush" Color="#FFFFFFFF"/>
    	<SolidColorBrush x:Key="ForegroundLightContrastColorBrush" Color="#FF8C867E"/>
    	<RadialGradientBrush x:Key="DesktopBkgRadialBrush">
    		<RadialGradientBrush.RelativeTransform>
    			<TransformGroup>
    				<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.372" ScaleY="1.372"/>
    				<SkewTransform CenterX="0.5" CenterY="0.5"/>
    				<RotateTransform CenterX="0.5" CenterY="0.5"/>
    				<TranslateTransform/>
    			</TransformGroup>
    		</RadialGradientBrush.RelativeTransform>
    		<GradientStop Color="#FF8C8C8C" Offset="1"/>
    		<GradientStop Color="#FF514848" Offset="0.871"/>
    		<GradientStop Color="#FF060202" Offset="0.585"/>
    	</RadialGradientBrush>
    	<LinearGradientBrush x:Key="WorkspaceTopBumpBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#26FFFFFF" Offset="0.054"/>
    		<GradientStop Color="#196C6C6C" Offset="0.406"/>
    		<GradientStop Color="#006C6C6C" Offset="0.643"/>
    		<GradientStop Color="#3F575656" Offset="0.232"/>
    	</LinearGradientBrush>
    	<LinearGradientBrush x:Key="WorkspaceBkgLinearBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FFFFFFFF" Offset="0.933"/>
    		<GradientStop Color="#FFFFFFFF" Offset="0"/>
    		<GradientStop Color="#FAEEE8E0" Offset="0.027"/>
    		<GradientStop Color="#FDF1F0EE" Offset="0.223"/>
    	</LinearGradientBrush>
    	<LinearGradientBrush x:Key="SideButtonSelectionBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FF574740" Offset="1"/>
    		<GradientStop Color="#FF5B4941" Offset="0"/>
    	</LinearGradientBrush>
    	<SolidColorBrush x:Key="SideButtonBorderColourBrush" Color="#FF6A6157"/>
    	<SolidColorBrush x:Key="ForegroundLight3ColourBrush" Color="#FFBDBDBD"/>
    	<LinearGradientBrush x:Key="OnlineRadialBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FF3EE427" Offset="0.268"/>
    		<GradientStop Color="#FF43C100" Offset="0.549"/>
    	</LinearGradientBrush>
    	<LinearGradientBrush x:Key="OnlineRadialBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FF265314" Offset="0.728"/>
    		<GradientStop Color="#FFAEFF8B" Offset="0.237"/>
    	</LinearGradientBrush>
    	<LinearGradientBrush x:Key="OfflineRadialBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FFFF0000" Offset="0.406"/>
    		<GradientStop Color="#FFCC2020" Offset="0.576"/>
    	</LinearGradientBrush>
    	<LinearGradientBrush x:Key="OfflineRadialBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FF510B0B" Offset="0.728"/>
    		<GradientStop Color="#FFFD3C3C" Offset="0.232"/>
    	</LinearGradientBrush>
    	<LinearGradientBrush x:Key="LightShadedBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FFF9F9F9" Offset="0.121"/>
    		<GradientStop Color="#FFABABAB" Offset="0"/>
    	</LinearGradientBrush>
    	<LinearGradientBrush x:Key="SideButtonHightlightBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FF66B71C" Offset="0.826"/>
    		<GradientStop Color="#FF7ACA2D" Offset="0.25"/>
    	</LinearGradientBrush>
        
    	<Style x:Key="ChromelessButtonStyle" TargetType="Button">
    		<Setter Property="Background" Value="#FF1F3B53"/>
    		<Setter Property="Foreground" Value="#FF000000"/>
    		<Setter Property="Padding" Value="3"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="BorderBrush">
    			<Setter.Value>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="#FFA3AEB9" Offset="0"/>
    					<GradientStop Color="#FF8399A9" Offset="0.375"/>
    					<GradientStop Color="#FF718597" Offset="0.375"/>
    					<GradientStop Color="#FF617584" Offset="1"/>
    				</LinearGradientBrush>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="Button">
    					<Grid Cursor="Hand">
    						<vsm:VisualStateManager.VisualStateGroups>
    							<vsm:VisualStateGroup x:Name="CommonStates">
    								<vsm:VisualStateGroup.Transitions>
    									<vsm:VisualTransition GeneratedDuration="00:00:00.1500000"/>
    									<vsm:VisualTransition GeneratedDuration="00:00:00" To="Pressed"/>
    									<vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00"/>
    								</vsm:VisualStateGroup.Transitions>
    								<vsm:VisualState x:Name="Normal"/>
    								<vsm:VisualState x:Name="MouseOver">
    									<Storyboard>
    										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
    											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.05"/>
    										</DoubleAnimationUsingKeyFrames>
    										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
    											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.05"/>
    										</DoubleAnimationUsingKeyFrames>
    									</Storyboard>
    								</vsm:VisualState>
    								<vsm:VisualState x:Name="Pressed">
    									<Storyboard>
    										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
    											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    										</DoubleAnimationUsingKeyFrames>
    										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    										</DoubleAnimationUsingKeyFrames>
    									</Storyboard>
    								</vsm:VisualState>
    								<vsm:VisualState x:Name="Disabled">
    									<Storyboard>
    										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
    											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
    										</DoubleAnimationUsingKeyFrames>
    									</Storyboard>
    								</vsm:VisualState>
    							</vsm:VisualStateGroup>
    							<vsm:VisualStateGroup x:Name="FocusStates">
    								<vsm:VisualState x:Name="Focused">
    									<Storyboard>
    										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
    											<SplineDoubleKeyFrame KeyTime="0" Value="0.2"/>
    										</DoubleAnimationUsingKeyFrames>
    									</Storyboard>
    								</vsm:VisualState>
    								<vsm:VisualState x:Name="Unfocused"/>
    							</vsm:VisualStateGroup>
    						</vsm:VisualStateManager.VisualStateGroups>
    						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}">
    							<ContentPresenter.RenderTransform>
    								<TransformGroup>
    									<ScaleTransform/>
    									<SkewTransform/>
    									<RotateTransform/>
    									<TranslateTransform/>
    								</TransformGroup>
    							</ContentPresenter.RenderTransform>
    						</ContentPresenter>
    						<Rectangle Margin="1" x:Name="FocusVisualElement" IsHitTestVisible="false" Opacity="0" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
    						<Rectangle HorizontalAlignment="Stretch" x:Name="HitAreaRectangle" Width="Auto" Fill="#00FFFFFF" Stroke="{x:Null}" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
		
    	<Style x:Key="FocuslessTextBoxStyle" TargetType="TextBox">
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="Background" Value="#FFFFFFFF"/>
    		<Setter Property="Foreground" Value="#FF000000"/>
    		<Setter Property="Padding" Value="2"/>
    		<Setter Property="BorderBrush">
    			<Setter.Value>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="#FFA3AEB9" Offset="0"/>
    					<GradientStop Color="#FF8399A9" Offset="0.375"/>
    					<GradientStop Color="#FF718597" Offset="0.375"/>
    					<GradientStop Color="#FF617584" Offset="1"/>
    				</LinearGradientBrush>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="TextBox">
    					<Grid x:Name="RootElement">
    						<vsm:VisualStateManager.VisualStateGroups>
    							<vsm:VisualStateGroup x:Name="CommonStates">
    								<vsm:VisualState x:Name="Normal"/>
    								<vsm:VisualState x:Name="MouseOver">
    									<Storyboard/>
    								</vsm:VisualState>
    								<vsm:VisualState x:Name="Disabled">
    									<Storyboard>
    										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
    											<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
    										</DoubleAnimationUsingKeyFrames>
    									</Storyboard>
    								</vsm:VisualState>
    								<vsm:VisualState x:Name="ReadOnly">
    									<Storyboard>
    										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ReadOnlyVisualElement" Storyboard.TargetProperty="Opacity">
    											<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
    										</DoubleAnimationUsingKeyFrames>
    									</Storyboard>
    								</vsm:VisualState>
    							</vsm:VisualStateGroup>
    							<vsm:VisualStateGroup x:Name="FocusStates">
    								<vsm:VisualState x:Name="Focused">
    									<Storyboard/>
    								</vsm:VisualState>
    								<vsm:VisualState x:Name="Unfocused">
    									<Storyboard/>
    								</vsm:VisualState>
    							</vsm:VisualStateGroup> 
    						</vsm:VisualStateManager.VisualStateGroups>
    						<Border x:Name="Border" Opacity="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1">
    							<Grid>
    								<Border x:Name="ReadOnlyVisualElement" Opacity="0" Background="#72F7F7F7"/>
    								<Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1">
    									<ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}"/>
    								</Border>
    							</Grid>
    						</Border>
    						<Border x:Name="DisabledVisualElement" IsHitTestVisible="False" 
								Opacity="0" Background="#A5F7F7F7" BorderBrush="#A5F7F7F7" 
								BorderThickness="{TemplateBinding BorderThickness}"/>
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
        
    </Application.Resources>
</Application>
